﻿using FluentMigrator;

namespace RockBus.Migrations.Version1_0
{
    [Migration(2)]
    public class M0002InsertEnumData : Migration
    {
        public override void Up()
        {
            Insert.IntoTable("TransportTypeEnum").Row(new { DbId = 0, Name = "WcfTransport" });
            Insert.IntoTable("TransportTypeEnum").Row(new { DbId = 1, Name = "FileTransport" });
            Insert.IntoTable("TransportTypeEnum").Row(new { DbId = 2, Name = "CustomTransport" });

            Insert.IntoTable("TransactionScopeOptionEnum").Row(new { DbId = 0, Name = "Required" });
            Insert.IntoTable("TransactionScopeOptionEnum").Row(new { DbId = 1, Name = "RequiresNew" });
            Insert.IntoTable("TransactionScopeOptionEnum").Row(new { DbId = 2, Name = "Suppress" });

            Insert.IntoTable("ExchangeTypeEnum").Row(new { DbId = 0, Name = "OneWay" });
            Insert.IntoTable("ExchangeTypeEnum").Row(new { DbId = 1, Name = "OneWayRequestResponse" });
            Insert.IntoTable("ExchangeTypeEnum").Row(new { DbId = 2, Name = "TwoWayAck" });
            Insert.IntoTable("ExchangeTypeEnum").Row(new { DbId = 3, Name = "TwoWayRequestResponse" });

            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 1, Name = "NetMsmqEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 2, Name = "NetNamedPipeEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 3, Name = "NetTcpEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 4, Name = "BasicHttpEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 5, Name = "WsHttpEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 6, Name = "WebSphereEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 7, Name = "WebLogicEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 8, Name = "MetroEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 9, Name = "Wso2InteropEndpoint" });
            Insert.IntoTable("EndpointNameEnum").Row(new { DbId = 10, Name = "Custom" });

            Insert.IntoTable("DeliveryModeEnum").Row(new { DbId = 0, Name = "Multicast", Description = "All endpoints in the destination will receive a copy of the message" });
            Insert.IntoTable("DeliveryModeEnum").Row(new
            {
                DbId = 1,
                Name = "MulticastTransactional",
                Description = "All endpoints in the destination will receive a copy of the message, but sending to the endpoints will be done by the same SendPort in one go. If one receiver fails to receive the message, the message will be retried to all endpoints."
            });
            Insert.IntoTable("DeliveryModeEnum").Row(new { DbId = 2, Name = "RoundRobin", Description = "Messages will be delivered to the endpoints of the destination in a RoundRobin fashion" });
            Insert.IntoTable("DeliveryModeEnum").Row(new { DbId = 3, Name = "Random", Description = "Messages will be delivered to the endpoints of the destination in a Random fashion" });

            Insert.IntoTable("ClientTypeEnum").Row(new { DbId = 0, Name = "Subscriber", Description = "Subscriber" });
            Insert.IntoTable("ClientTypeEnum").Row(new { DbId = 1, Name = "Publisher", Description = "Publisher" });

            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 0, Name = "Action" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 1, Name = "EndpointAddress" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 2, Name = "PrefixEndpointAddress" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 3, Name = "And" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 4, Name = "Custom" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 5, Name = "EndpointName" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 6, Name = "MatchAll" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 7, Name = "XPath" });
            Insert.IntoTable("FilterTypeEnum").Row(new { DbId = 8, Name = "Topic" });

            Insert.IntoTable("TransformationTypeEnum").Row(new { DbId = 0, Name = "Xslt" });
            Insert.IntoTable("TransformationTypeEnum").Row(new { DbId = 1, Name = "Custom" });
            Insert.IntoTable("TransformationTypeEnum").Row(new { DbId = 2, Name = "XsdValidation" });
        }

        public override void Down()
        {
        }
    }
}